#pragma once
//#define CUDATLGDLL_EXPORTS
#ifdef CUDATLGDLL_EXPORTS
#define CUDATLGDLL_API __declspec(dllexport)
#else
#define CUDATLGDLL_API __declspec(dllimport)
#endif

#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include<graphics.h>
#include <CImg.h>
#include <iostream>
#include <fstream>
#include <thread>
using namespace cimg_library;

class  ImgUpdater
{
private:
	COLORREF* imgMem;
	double3* sysMem;
	int Height;
	int Width;
public:
	~ImgUpdater() {
		cudaFree(imgMem);
	};
	CUDATLGDLL_API ImgUpdater(CImg<char>* img);
	CUDATLGDLL_API void update();
	CUDATLGDLL_API void ChangePixel(int x, int y, COLORREF color);
	CUDATLGDLL_API CImg<char> getImg();
};

